<!DOCTYPE html>
<html lang="en">
    <head>
        <?php require_once('../modulos/header.php'); ?> 
        
            <body  style="background-image: url(../img/rayas_verticales.jpg); background-size: 100%;">
               
                <?php require_once('../modulos/navbar.php'); ?>
                
                <div class='row'>
                    <br><br><br>
                       <div class="col-md-8 text-center col-lg-offset-2" style="background: #e7e7e7; border-radius: 15px;">
                        <?php 
                        require_once '../conex.php';
                            $fila = $_POST['idOpo'];
                            $data = explode("/", $fila);
                            
                            $query2 = "SELECT jugadores.nombre, jugadores.apellido "
                                    . "FROM jugadores, eventos "
                                    . "WHERE eventos.idJugador = $data[0]";

                            $eje2 = mysql_query($query2);
                            $row2 = mysql_fetch_array($eje2);
                        ?>
                           <a href="../vistas/mod_suspendidos.php">
                            <div class="col-md-1 text-left" style="height: 50px; padding-top: 10px">
                                <strong>Volver</strong>
                            </div>
                        </a>
                        <br>
                        <br>
                        <p class="lead"><strong>Jugador: </strong><?php echo $row2['nombre'].' '.$row2['apellido']; ?></p>
                        <p class="lead"><strong>Fecha de suspensión: </strong><?php echo $data[1]; ?></p>
                        <p class="lead"><strong>Estado: </strong><?php echo $data[2]; ?></p>
                        <br>
                        <form method="POST" action="../editar/suspension.php">
                            <div class="col-md-6">
                               <?php
                                        $qr2 = "SELECT * FROM jugadores";
                                        $ejecutar2 = mysql_query($qr2);
                                    ?>
                                    <label>Jugador:</label>
                                    <select class="form-control" name="jugador" required>
                                        <?php 
                                        while ($fila = mysql_fetch_array($ejecutar2)){ ?>
                                        <option id="<?php echo $fila['idJugadores']; ?>" value="<?php echo $fila['idJugadores']; ?>">
                                            <?php echo $fila['nombre']." ".$fila['apellido']; 
                                            } 
                                            mysql_close();   
                                        ?>
                                        </option>
                                    </select>
                            </div>
                            <div class="col-md-6">
                                <label>Fecha de suspensión:</label>
                                <input name="fecha" type="date" class="form-control" required>
                                <label>Estado:</label>
                                <select class="form-control" name="estado" required>
                                    <option value="1">Activo</option>
                                    <option value="0">Inactivo</option>
                                </select>    
                                <br>
                                <br>
                                <button type="submit" class="btn btn-success"> Guardar</button>
                            </div>   
                        </form> 
                    </div>      
            </div> 
       
        <script type='text/javascript' src="../js/jquery.min.js"></script>
        <script type='text/javascript' src="../js/bootstrap.js"></script>
        <script type='text/javascript' src="../js/bootstrap.min.js"></script>
        
        <script type='text/javascript'>
        
        $(document).ready(function() {
        
            
        
        });
        
        </script>
        
        <script>
          (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
          (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
          m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
          })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
          ga('create', 'UA-40413119-1', 'bootply.com');
          ga('send', 'pageview');
        </script>
        
        <?php
        // put your code here
        ?>
        
    </body>
</html>